<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: drogon::HttpResponse类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacedrogon.html">drogon</a></li><li class="navelem"><a class="el" href="classdrogon_1_1HttpResponse.html">HttpResponse</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="classdrogon_1_1HttpResponse-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">drogon::HttpResponse类 参考<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="HttpResponse_8h_source.html">HttpResponse.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a44ad31ad5d49291836b96434b5e7fc4a" id="r_a44ad31ad5d49291836b96434b5e7fc4a"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a44ad31ad5d49291836b96434b5e7fc4a">SendfileRange</a> = std::pair&lt; size_t, size_t &gt;</td></tr>
<tr class="memdesc:a44ad31ad5d49291836b96434b5e7fc4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the range of the file response as a pair ot size_t (offset, length). Length of 0 means the entire file is sent. Behavior of this function is undefined if the response if not a file response  <br /></td></tr>
<tr class="separator:a44ad31ad5d49291836b96434b5e7fc4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ae17cf4dedf9b48c946206745b5309726" id="r_ae17cf4dedf9b48c946206745b5309726"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ae17cf4dedf9b48c946206745b5309726"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#ae17cf4dedf9b48c946206745b5309726">operator T</a> () const</td></tr>
<tr class="memdesc:ae17cf4dedf9b48c946206745b5309726"><td class="mdescLeft">&#160;</td><td class="mdescRight">This template enables automatic type conversion. For using this template, user must specialize the fromResponse template. For example a shared_ptr&lt;Json::Value&gt; specialization version is available above, so we can use the following code to get a json object:  <br /></td></tr>
<tr class="separator:ae17cf4dedf9b48c946206745b5309726"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca1cb08090fe9c6195d708a63e32f65f" id="r_aca1cb08090fe9c6195d708a63e32f65f"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:aca1cb08090fe9c6195d708a63e32f65f"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#aca1cb08090fe9c6195d708a63e32f65f">as</a> () const</td></tr>
<tr class="memdesc:aca1cb08090fe9c6195d708a63e32f65f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This template enables explicit type conversion, see the above template.  <br /></td></tr>
<tr class="separator:aca1cb08090fe9c6195d708a63e32f65f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7091b020a4c8212b170c0ae71a77adea" id="r_a7091b020a4c8212b170c0ae71a77adea"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespacedrogon.html#ad6cc6b2c3917537432fcde077e02cf2f">HttpStatusCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a7091b020a4c8212b170c0ae71a77adea">statusCode</a> () const =0</td></tr>
<tr class="memdesc:a7091b020a4c8212b170c0ae71a77adea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the status code such as 200, 404  <br /></td></tr>
<tr class="separator:a7091b020a4c8212b170c0ae71a77adea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a202565ddc4967af0a3d96f6d04781b97" id="r_a202565ddc4967af0a3d96f6d04781b97"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacedrogon.html#ad6cc6b2c3917537432fcde077e02cf2f">HttpStatusCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a202565ddc4967af0a3d96f6d04781b97">getStatusCode</a> () const</td></tr>
<tr class="separator:a202565ddc4967af0a3d96f6d04781b97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1523682a313c946849b7234cc4891ab" id="r_ac1523682a313c946849b7234cc4891ab"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#ac1523682a313c946849b7234cc4891ab">setStatusCode</a> (<a class="el" href="namespacedrogon.html#ad6cc6b2c3917537432fcde077e02cf2f">HttpStatusCode</a> code)=0</td></tr>
<tr class="memdesc:ac1523682a313c946849b7234cc4891ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the status code of the response.  <br /></td></tr>
<tr class="separator:ac1523682a313c946849b7234cc4891ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf88889bd7729e6f80ee8d5322c9e931" id="r_abf88889bd7729e6f80ee8d5322c9e931"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#abf88889bd7729e6f80ee8d5322c9e931">setCustomStatusCode</a> (int code, std::string_view message=std::string_view{})</td></tr>
<tr class="separator:abf88889bd7729e6f80ee8d5322c9e931"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07e21a5e58fbd8b859a9810bf338403d" id="r_a07e21a5e58fbd8b859a9810bf338403d"><td class="memItemLeft" align="right" valign="top">virtual const trantor::Date &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a07e21a5e58fbd8b859a9810bf338403d">creationDate</a> () const =0</td></tr>
<tr class="memdesc:a07e21a5e58fbd8b859a9810bf338403d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the creation timestamp of the response.  <br /></td></tr>
<tr class="separator:a07e21a5e58fbd8b859a9810bf338403d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb269abb75024232eb5ebb70df076dc5" id="r_acb269abb75024232eb5ebb70df076dc5"><td class="memItemLeft" align="right" valign="top">const trantor::Date &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#acb269abb75024232eb5ebb70df076dc5">getCreationDate</a> () const</td></tr>
<tr class="separator:acb269abb75024232eb5ebb70df076dc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad3deeeee0abe826a7800402a24475b8" id="r_aad3deeeee0abe826a7800402a24475b8"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#aad3deeeee0abe826a7800402a24475b8">setVersion</a> (const <a class="el" href="namespacedrogon.html#ac6b3a6bb435a379d956658fa20b067c1">Version</a> v)=0</td></tr>
<tr class="memdesc:aad3deeeee0abe826a7800402a24475b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the http version, http1.0 or http1.1  <br /></td></tr>
<tr class="separator:aad3deeeee0abe826a7800402a24475b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afde0d1d460db8890a988b546f8e37922" id="r_afde0d1d460db8890a988b546f8e37922"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#afde0d1d460db8890a988b546f8e37922">setCloseConnection</a> (bool on)=0</td></tr>
<tr class="memdesc:afde0d1d460db8890a988b546f8e37922"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set if close the connection after the request is sent.  <br /></td></tr>
<tr class="separator:afde0d1d460db8890a988b546f8e37922"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91282f3ceb97ea8c6625c9cd8ea98018" id="r_a91282f3ceb97ea8c6625c9cd8ea98018"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a91282f3ceb97ea8c6625c9cd8ea98018">ifCloseConnection</a> () const =0</td></tr>
<tr class="memdesc:a91282f3ceb97ea8c6625c9cd8ea98018"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the status set by the <a class="el" href="classdrogon_1_1HttpResponse.html#afde0d1d460db8890a988b546f8e37922" title="Set if close the connection after the request is sent.">setCloseConnection()</a> method.  <br /></td></tr>
<tr class="separator:a91282f3ceb97ea8c6625c9cd8ea98018"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66d24be506a03dd6bd0b390632ba8d5c" id="r_a66d24be506a03dd6bd0b390632ba8d5c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a66d24be506a03dd6bd0b390632ba8d5c">setContentTypeCode</a> (<a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a> type)=0</td></tr>
<tr class="separator:a66d24be506a03dd6bd0b390632ba8d5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9ee5b698aa6bfa317ef81cd69a6d821" id="r_ac9ee5b698aa6bfa317ef81cd69a6d821"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#ac9ee5b698aa6bfa317ef81cd69a6d821">setContentTypeString</a> (const std::string_view &amp;typeString)</td></tr>
<tr class="separator:ac9ee5b698aa6bfa317ef81cd69a6d821"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af254863ebc2d6f3ff9679515be4a4d61" id="r_af254863ebc2d6f3ff9679515be4a4d61"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#af254863ebc2d6f3ff9679515be4a4d61">setContentTypeCodeAndCustomString</a> (<a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a> type, const std::string_view &amp;typeString)</td></tr>
<tr class="separator:af254863ebc2d6f3ff9679515be4a4d61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1f02075d07dd25e1d9650773858def2" id="r_aa1f02075d07dd25e1d9650773858def2"><td class="memTemplParams" colspan="2">template&lt;int N&gt; </td></tr>
<tr class="memitem:aa1f02075d07dd25e1d9650773858def2"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#aa1f02075d07dd25e1d9650773858def2">setContentTypeCodeAndCustomString</a> (<a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a> type, const char(&amp;typeString)[N])</td></tr>
<tr class="separator:aa1f02075d07dd25e1d9650773858def2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40d7c826a667934774e2b93c39e7a557" id="r_a40d7c826a667934774e2b93c39e7a557"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a40d7c826a667934774e2b93c39e7a557">contentType</a> () const =0</td></tr>
<tr class="memdesc:a40d7c826a667934774e2b93c39e7a557"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the response content type.  <br /></td></tr>
<tr class="separator:a40d7c826a667934774e2b93c39e7a557"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a954b1cb990ba8834eeb6678e9ae740b0" id="r_a954b1cb990ba8834eeb6678e9ae740b0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a954b1cb990ba8834eeb6678e9ae740b0">getContentType</a> () const</td></tr>
<tr class="separator:a954b1cb990ba8834eeb6678e9ae740b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94dacca25b2485e1dd750235986f9fdd" id="r_a94dacca25b2485e1dd750235986f9fdd"><td class="memItemLeft" align="right" valign="top">virtual const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a94dacca25b2485e1dd750235986f9fdd">getHeader</a> (std::string key) const =0</td></tr>
<tr class="memdesc:a94dacca25b2485e1dd750235986f9fdd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the header string identified by the key parameter.  <br /></td></tr>
<tr class="separator:a94dacca25b2485e1dd750235986f9fdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76f37d51bf036afb28aacaa229a1823b" id="r_a76f37d51bf036afb28aacaa229a1823b"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a76f37d51bf036afb28aacaa229a1823b">removeHeader</a> (std::string key)=0</td></tr>
<tr class="memdesc:a76f37d51bf036afb28aacaa229a1823b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the header identified by the key parameter.  <br /></td></tr>
<tr class="separator:a76f37d51bf036afb28aacaa229a1823b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b5d3ef182dbf502aa1ce5f754735a2c" id="r_a4b5d3ef182dbf502aa1ce5f754735a2c"><td class="memItemLeft" align="right" valign="top">virtual const SafeStringMap&lt; std::string &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a4b5d3ef182dbf502aa1ce5f754735a2c">headers</a> () const =0</td></tr>
<tr class="memdesc:a4b5d3ef182dbf502aa1ce5f754735a2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get all headers of the response  <br /></td></tr>
<tr class="separator:a4b5d3ef182dbf502aa1ce5f754735a2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee0e2cdc4ac1096ff9ad85d7ecaba38f" id="r_aee0e2cdc4ac1096ff9ad85d7ecaba38f"><td class="memItemLeft" align="right" valign="top">const SafeStringMap&lt; std::string &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#aee0e2cdc4ac1096ff9ad85d7ecaba38f">getHeaders</a> () const</td></tr>
<tr class="memdesc:aee0e2cdc4ac1096ff9ad85d7ecaba38f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get all headers of the response  <br /></td></tr>
<tr class="separator:aee0e2cdc4ac1096ff9ad85d7ecaba38f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53ecb77166d6b2d40bda2a33346b271c" id="r_a53ecb77166d6b2d40bda2a33346b271c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a53ecb77166d6b2d40bda2a33346b271c">addHeader</a> (std::string field, const std::string &amp;value)=0</td></tr>
<tr class="memdesc:a53ecb77166d6b2d40bda2a33346b271c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the header string identified by the field parameter  <br /></td></tr>
<tr class="separator:a53ecb77166d6b2d40bda2a33346b271c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0506888a960fa85365cc729c5ca35eb0" id="r_a0506888a960fa85365cc729c5ca35eb0"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a0506888a960fa85365cc729c5ca35eb0">addHeader</a> (std::string field, std::string &amp;&amp;value)=0</td></tr>
<tr class="separator:a0506888a960fa85365cc729c5ca35eb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb116c3db7cd2b29f8d6a574eb60a9b4" id="r_afb116c3db7cd2b29f8d6a574eb60a9b4"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#afb116c3db7cd2b29f8d6a574eb60a9b4">addCookie</a> (const std::string &amp;key, const std::string &amp;value)=0</td></tr>
<tr class="memdesc:afb116c3db7cd2b29f8d6a574eb60a9b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a cookie  <br /></td></tr>
<tr class="separator:afb116c3db7cd2b29f8d6a574eb60a9b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a97046bc1d9c458bc117860e6327eed" id="r_a7a97046bc1d9c458bc117860e6327eed"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a7a97046bc1d9c458bc117860e6327eed">addCookie</a> (const <a class="el" href="classdrogon_1_1Cookie.html">Cookie</a> &amp;cookie)=0</td></tr>
<tr class="memdesc:a7a97046bc1d9c458bc117860e6327eed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a cookie  <br /></td></tr>
<tr class="separator:a7a97046bc1d9c458bc117860e6327eed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac65360ebe2d7e39013627fb7c1c97201" id="r_ac65360ebe2d7e39013627fb7c1c97201"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#ac65360ebe2d7e39013627fb7c1c97201">addCookie</a> (<a class="el" href="classdrogon_1_1Cookie.html">Cookie</a> &amp;&amp;cookie)=0</td></tr>
<tr class="separator:ac65360ebe2d7e39013627fb7c1c97201"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57164725a0789fe9458de20ac6b6c402" id="r_a57164725a0789fe9458de20ac6b6c402"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classdrogon_1_1Cookie.html">Cookie</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a57164725a0789fe9458de20ac6b6c402">getCookie</a> (const std::string &amp;key) const =0</td></tr>
<tr class="separator:a57164725a0789fe9458de20ac6b6c402"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a569c7cd5efff996af64e1103243b2249" id="r_a569c7cd5efff996af64e1103243b2249"><td class="memItemLeft" align="right" valign="top">virtual const SafeStringMap&lt; <a class="el" href="classdrogon_1_1Cookie.html">Cookie</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a569c7cd5efff996af64e1103243b2249">cookies</a> () const =0</td></tr>
<tr class="memdesc:a569c7cd5efff996af64e1103243b2249"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get all cookies.  <br /></td></tr>
<tr class="separator:a569c7cd5efff996af64e1103243b2249"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6cecffb5a8b7095577a3bf5b2d6f0d6b" id="r_a6cecffb5a8b7095577a3bf5b2d6f0d6b"><td class="memItemLeft" align="right" valign="top">const SafeStringMap&lt; <a class="el" href="classdrogon_1_1Cookie.html">Cookie</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a6cecffb5a8b7095577a3bf5b2d6f0d6b">getCookies</a> () const</td></tr>
<tr class="memdesc:a6cecffb5a8b7095577a3bf5b2d6f0d6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get all cookies.  <br /></td></tr>
<tr class="separator:a6cecffb5a8b7095577a3bf5b2d6f0d6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78ef3f2563aeba016ae88cc7a0a6a123" id="r_a78ef3f2563aeba016ae88cc7a0a6a123"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a78ef3f2563aeba016ae88cc7a0a6a123">removeCookie</a> (const std::string &amp;key)=0</td></tr>
<tr class="memdesc:a78ef3f2563aeba016ae88cc7a0a6a123"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the cookie identified by the key parameter.  <br /></td></tr>
<tr class="separator:a78ef3f2563aeba016ae88cc7a0a6a123"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18114e50a4274cebdab859bf8d9deb1e" id="r_a18114e50a4274cebdab859bf8d9deb1e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a18114e50a4274cebdab859bf8d9deb1e">setBody</a> (const std::string &amp;<a class="el" href="classdrogon_1_1HttpResponse.html#a63c26ba958c691523e807de77e8e8ed1">body</a>)=0</td></tr>
<tr class="memdesc:a18114e50a4274cebdab859bf8d9deb1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the response body(content).  <br /></td></tr>
<tr class="separator:a18114e50a4274cebdab859bf8d9deb1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a015c77c0a7a47f0e37347038ce4de81a" id="r_a015c77c0a7a47f0e37347038ce4de81a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a015c77c0a7a47f0e37347038ce4de81a">setBody</a> (std::string &amp;&amp;<a class="el" href="classdrogon_1_1HttpResponse.html#a63c26ba958c691523e807de77e8e8ed1">body</a>)=0</td></tr>
<tr class="memdesc:a015c77c0a7a47f0e37347038ce4de81a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the response body(content).  <br /></td></tr>
<tr class="separator:a015c77c0a7a47f0e37347038ce4de81a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc5e9e155d366c487c1601feca9b8203" id="r_adc5e9e155d366c487c1601feca9b8203"><td class="memTemplParams" colspan="2">template&lt;int N&gt; </td></tr>
<tr class="memitem:adc5e9e155d366c487c1601feca9b8203"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#adc5e9e155d366c487c1601feca9b8203">setBody</a> (const char(&amp;<a class="el" href="classdrogon_1_1HttpResponse.html#a63c26ba958c691523e807de77e8e8ed1">body</a>)[N])</td></tr>
<tr class="memdesc:adc5e9e155d366c487c1601feca9b8203"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the response body(content).  <br /></td></tr>
<tr class="separator:adc5e9e155d366c487c1601feca9b8203"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63c26ba958c691523e807de77e8e8ed1" id="r_a63c26ba958c691523e807de77e8e8ed1"><td class="memItemLeft" align="right" valign="top">std::string_view&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a63c26ba958c691523e807de77e8e8ed1">body</a> () const</td></tr>
<tr class="memdesc:a63c26ba958c691523e807de77e8e8ed1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the response body.  <br /></td></tr>
<tr class="separator:a63c26ba958c691523e807de77e8e8ed1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cf39df6715c6d2340bb045cd94f76c3" id="r_a1cf39df6715c6d2340bb045cd94f76c3"><td class="memItemLeft" align="right" valign="top">std::string_view&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a1cf39df6715c6d2340bb045cd94f76c3">getBody</a> () const</td></tr>
<tr class="memdesc:a1cf39df6715c6d2340bb045cd94f76c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the response body.  <br /></td></tr>
<tr class="separator:a1cf39df6715c6d2340bb045cd94f76c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77a3c7a91c08d0976851beb1552fde81" id="r_a77a3c7a91c08d0976851beb1552fde81"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a77a3c7a91c08d0976851beb1552fde81">versionString</a> () const =0</td></tr>
<tr class="separator:a77a3c7a91c08d0976851beb1552fde81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a278c40a9ac60b899e9b6217bf5a4b987" id="r_a278c40a9ac60b899e9b6217bf5a4b987"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a278c40a9ac60b899e9b6217bf5a4b987">getVersionString</a> () const</td></tr>
<tr class="separator:a278c40a9ac60b899e9b6217bf5a4b987"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99c9e306078005a68455e3157884f483" id="r_a99c9e306078005a68455e3157884f483"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespacedrogon.html#ac6b3a6bb435a379d956658fa20b067c1">Version</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a99c9e306078005a68455e3157884f483">version</a> () const =0</td></tr>
<tr class="memdesc:a99c9e306078005a68455e3157884f483"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the enum type version of the response.  <br /></td></tr>
<tr class="separator:a99c9e306078005a68455e3157884f483"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a046e5e829a3cbd2ef7069370911cea1e" id="r_a046e5e829a3cbd2ef7069370911cea1e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacedrogon.html#ac6b3a6bb435a379d956658fa20b067c1">Version</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a046e5e829a3cbd2ef7069370911cea1e">getVersion</a> () const</td></tr>
<tr class="memdesc:a046e5e829a3cbd2ef7069370911cea1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the enum type version of the response.  <br /></td></tr>
<tr class="separator:a046e5e829a3cbd2ef7069370911cea1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03bdeb98dfb26835960b744511408794" id="r_a03bdeb98dfb26835960b744511408794"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a03bdeb98dfb26835960b744511408794">clear</a> ()=0</td></tr>
<tr class="memdesc:a03bdeb98dfb26835960b744511408794"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset the response object to its initial state  <br /></td></tr>
<tr class="separator:a03bdeb98dfb26835960b744511408794"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a975259181a13f0ab238ef5325caf8b8b" id="r_a975259181a13f0ab238ef5325caf8b8b"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a975259181a13f0ab238ef5325caf8b8b">setExpiredTime</a> (ssize_t <a class="el" href="classdrogon_1_1HttpResponse.html#a6bbaaa5b26a83176827ce4a9d2792da2">expiredTime</a>)=0</td></tr>
<tr class="separator:a975259181a13f0ab238ef5325caf8b8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bbaaa5b26a83176827ce4a9d2792da2" id="r_a6bbaaa5b26a83176827ce4a9d2792da2"><td class="memItemLeft" align="right" valign="top">virtual ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a6bbaaa5b26a83176827ce4a9d2792da2">expiredTime</a> () const =0</td></tr>
<tr class="memdesc:a6bbaaa5b26a83176827ce4a9d2792da2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the expiration time of the response.  <br /></td></tr>
<tr class="separator:a6bbaaa5b26a83176827ce4a9d2792da2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58081265552934448a6c40e521607985" id="r_a58081265552934448a6c40e521607985"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a58081265552934448a6c40e521607985">getExpiredTime</a> () const</td></tr>
<tr class="separator:a58081265552934448a6c40e521607985"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57e800f8ad97516cb4738333b7afcba3" id="r_a57e800f8ad97516cb4738333b7afcba3"><td class="memItemLeft" align="right" valign="top">virtual const std::shared_ptr&lt; Json::Value &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a57e800f8ad97516cb4738333b7afcba3">jsonObject</a> () const =0</td></tr>
<tr class="separator:a57e800f8ad97516cb4738333b7afcba3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a499e596719ced362e9eeae50de93c9" id="r_a4a499e596719ced362e9eeae50de93c9"><td class="memItemLeft" align="right" valign="top">const std::shared_ptr&lt; Json::Value &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a4a499e596719ced362e9eeae50de93c9">getJsonObject</a> () const</td></tr>
<tr class="separator:a4a499e596719ced362e9eeae50de93c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdaff2509394ba08e58584aa7209e625" id="r_afdaff2509394ba08e58584aa7209e625"><td class="memItemLeft" align="right" valign="top">virtual const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#afdaff2509394ba08e58584aa7209e625">getJsonError</a> () const =0</td></tr>
<tr class="memdesc:afdaff2509394ba08e58584aa7209e625"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the error message of parsing the JSON body received from peer. This method usually is called after getting a empty shared_ptr object by the <a class="el" href="classdrogon_1_1HttpResponse.html#a4a499e596719ced362e9eeae50de93c9">getJsonObject()</a> method.  <br /></td></tr>
<tr class="separator:afdaff2509394ba08e58584aa7209e625"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec5f18f112c1a8ffd253cf31c2c84fd4" id="r_aec5f18f112c1a8ffd253cf31c2c84fd4"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#aec5f18f112c1a8ffd253cf31c2c84fd4">setPassThrough</a> (bool flag)=0</td></tr>
<tr class="memdesc:aec5f18f112c1a8ffd253cf31c2c84fd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the response object to the pass-through mode or not. It's not by default when a new response object is created. In pass-through mode, no additional headers (including server, date, content-type and content-length, etc.) are added to the response. This mode is useful for some applications such as a proxy.  <br /></td></tr>
<tr class="separator:aec5f18f112c1a8ffd253cf31c2c84fd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae00c3140bb4759feaea8fc7f7e82e940" id="r_ae00c3140bb4759feaea8fc7f7e82e940"><td class="memItemLeft" align="right" valign="top">virtual const trantor::CertificatePtr &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#ae00c3140bb4759feaea8fc7f7e82e940">peerCertificate</a> () const =0</td></tr>
<tr class="memdesc:ae00c3140bb4759feaea8fc7f7e82e940"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the certificate of the peer, if any.  <br /></td></tr>
<tr class="separator:ae00c3140bb4759feaea8fc7f7e82e940"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fbbcf3c1f7c799693bfeadf0d9f5adb" id="r_a1fbbcf3c1f7c799693bfeadf0d9f5adb"><td class="memItemLeft" align="right" valign="top">const trantor::CertificatePtr &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a1fbbcf3c1f7c799693bfeadf0d9f5adb">getPeerCertificate</a> () const</td></tr>
<tr class="separator:a1fbbcf3c1f7c799693bfeadf0d9f5adb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d1bc11f80d93ad6a8ee7fb64e51dde0" id="r_a8d1bc11f80d93ad6a8ee7fb64e51dde0"><td class="memItemLeft" align="right" valign="top">virtual const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a8d1bc11f80d93ad6a8ee7fb64e51dde0">sendfileName</a> () const =0</td></tr>
<tr class="memdesc:a8d1bc11f80d93ad6a8ee7fb64e51dde0"><td class="mdescLeft">&#160;</td><td class="mdescRight">If the response is a file response (i.e. created by newFileResponse) returns the path on the filesystem. Otherwise a empty string.  <br /></td></tr>
<tr class="separator:a8d1bc11f80d93ad6a8ee7fb64e51dde0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a259114437157085d2f3dda48a181e264" id="r_a259114437157085d2f3dda48a181e264"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classdrogon_1_1HttpResponse.html#a44ad31ad5d49291836b96434b5e7fc4a">SendfileRange</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a259114437157085d2f3dda48a181e264">sendfileRange</a> () const =0</td></tr>
<tr class="separator:a259114437157085d2f3dda48a181e264"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af345a0cc25536620c01dafcc04667bfa" id="r_af345a0cc25536620c01dafcc04667bfa"><td class="memItemLeft" align="right" valign="top">virtual const std::function&lt; std::size_t(char *, std::size_t)&gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#af345a0cc25536620c01dafcc04667bfa">streamCallback</a> () const =0</td></tr>
<tr class="memdesc:af345a0cc25536620c01dafcc04667bfa"><td class="mdescLeft">&#160;</td><td class="mdescRight">If the response is a stream response (i.e. created by newStreamResponse) returns the callback function. Otherwise a null function.  <br /></td></tr>
<tr class="separator:af345a0cc25536620c01dafcc04667bfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5832929b4c9e740ac49e57af205b8d8" id="r_ad5832929b4c9e740ac49e57af205b8d8"><td class="memItemLeft" align="right" valign="top">virtual const std::function&lt; void(<a class="el" href="namespacedrogon.html#ac29de97af31aae6951b30d7ef8749fd9">ResponseStreamPtr</a>)&gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#ad5832929b4c9e740ac49e57af205b8d8">asyncStreamCallback</a> () const =0</td></tr>
<tr class="memdesc:ad5832929b4c9e740ac49e57af205b8d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">If the response is a async stream response (i.e. created by asyncStreamCallback) returns the stream ptr.  <br /></td></tr>
<tr class="separator:ad5832929b4c9e740ac49e57af205b8d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed36ab5336669f7db117913c8d028b2a" id="r_aed36ab5336669f7db117913c8d028b2a"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#aed36ab5336669f7db117913c8d028b2a">contentTypeString</a> () const =0</td></tr>
<tr class="memdesc:aed36ab5336669f7db117913c8d028b2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the content type associated with the response  <br /></td></tr>
<tr class="separator:aed36ab5336669f7db117913c8d028b2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e18484f63f6da85c403a44605de5ee8" id="r_a4e18484f63f6da85c403a44605de5ee8"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a4e18484f63f6da85c403a44605de5ee8">~HttpResponse</a> ()</td></tr>
<tr class="separator:a4e18484f63f6da85c403a44605de5ee8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a76e9f38d3cf0b6b69d23d1f53ce5afbe" id="r_a76e9f38d3cf0b6b69d23d1f53ce5afbe"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a76e9f38d3cf0b6b69d23d1f53ce5afbe">newHttpResponse</a> ()</td></tr>
<tr class="separator:a76e9f38d3cf0b6b69d23d1f53ce5afbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa409a489a6bb1b7b9a4fd01aee2ed3d7" id="r_aa409a489a6bb1b7b9a4fd01aee2ed3d7"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#aa409a489a6bb1b7b9a4fd01aee2ed3d7">newHttpResponse</a> (<a class="el" href="namespacedrogon.html#ad6cc6b2c3917537432fcde077e02cf2f">HttpStatusCode</a> code, <a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a> type)</td></tr>
<tr class="memdesc:aa409a489a6bb1b7b9a4fd01aee2ed3d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a response with a status code and a content type  <br /></td></tr>
<tr class="separator:aa409a489a6bb1b7b9a4fd01aee2ed3d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7dbe82af88eae091b7684edb67d5f99" id="r_ae7dbe82af88eae091b7684edb67d5f99"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#ae7dbe82af88eae091b7684edb67d5f99">newNotFoundResponse</a> (const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;req=<a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a>())</td></tr>
<tr class="memdesc:ae7dbe82af88eae091b7684edb67d5f99"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a response which returns a 404 page.  <br /></td></tr>
<tr class="separator:ae7dbe82af88eae091b7684edb67d5f99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82c46a1155b1ff1494f5995b241b4034" id="r_a82c46a1155b1ff1494f5995b241b4034"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a82c46a1155b1ff1494f5995b241b4034">newHttpJsonResponse</a> (const Json::Value &amp;data)</td></tr>
<tr class="separator:a82c46a1155b1ff1494f5995b241b4034"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2bd4aa9c3b2caa800534f3013b491e8" id="r_ab2bd4aa9c3b2caa800534f3013b491e8"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#ab2bd4aa9c3b2caa800534f3013b491e8">newHttpJsonResponse</a> (Json::Value &amp;&amp;data)</td></tr>
<tr class="separator:ab2bd4aa9c3b2caa800534f3013b491e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7001b5fa3cf32b1401c01e65fcafa4d7" id="r_a7001b5fa3cf32b1401c01e65fcafa4d7"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a7001b5fa3cf32b1401c01e65fcafa4d7">newHttpViewResponse</a> (const std::string &amp;viewName, const <a class="el" href="classdrogon_1_1HttpViewData.html">HttpViewData</a> &amp;data=<a class="el" href="classdrogon_1_1HttpViewData.html">HttpViewData</a>(), const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;req=<a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a>())</td></tr>
<tr class="separator:a7001b5fa3cf32b1401c01e65fcafa4d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a953a8ca52e9f14b44f076f576c86dbd6" id="r_a953a8ca52e9f14b44f076f576c86dbd6"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a953a8ca52e9f14b44f076f576c86dbd6">newRedirectionResponse</a> (const std::string &amp;location, <a class="el" href="namespacedrogon.html#ad6cc6b2c3917537432fcde077e02cf2f">HttpStatusCode</a> status=<a class="el" href="namespacedrogon.html#ad6cc6b2c3917537432fcde077e02cf2fa9eabc5c863c94feee133e077aec244c2">k302Found</a>)</td></tr>
<tr class="separator:a953a8ca52e9f14b44f076f576c86dbd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8800fe9bd787342db3b231d6996a8cfe" id="r_a8800fe9bd787342db3b231d6996a8cfe"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a8800fe9bd787342db3b231d6996a8cfe">newFileResponse</a> (const std::string &amp;fullPath, const std::string &amp;attachmentFileName=&quot;&quot;, <a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a> type=<a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823a61e343a42203e1c58b16c9683e1f0876">CT_NONE</a>, const std::string &amp;typeString=&quot;&quot;, const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;req=<a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a>())</td></tr>
<tr class="memdesc:a8800fe9bd787342db3b231d6996a8cfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a response that returns a file to the client.  <br /></td></tr>
<tr class="separator:a8800fe9bd787342db3b231d6996a8cfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83447cc5e0ef7135146f1ce5059d39b8" id="r_a83447cc5e0ef7135146f1ce5059d39b8"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a83447cc5e0ef7135146f1ce5059d39b8">newFileResponse</a> (const std::string &amp;fullPath, size_t offset, size_t length, bool setContentRange=true, const std::string &amp;attachmentFileName=&quot;&quot;, <a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a> type=<a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823a61e343a42203e1c58b16c9683e1f0876">CT_NONE</a>, const std::string &amp;typeString=&quot;&quot;, const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;req=<a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a>())</td></tr>
<tr class="memdesc:a83447cc5e0ef7135146f1ce5059d39b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a response that returns part of a file to the client.  <br /></td></tr>
<tr class="separator:a83447cc5e0ef7135146f1ce5059d39b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4c84b9f7260314d84235cf311f5e39e" id="r_ad4c84b9f7260314d84235cf311f5e39e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#ad4c84b9f7260314d84235cf311f5e39e">newFileResponse</a> (const unsigned char *pBuffer, size_t bufferLength, const std::string &amp;attachmentFileName=&quot;&quot;, <a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a> type=<a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823a61e343a42203e1c58b16c9683e1f0876">CT_NONE</a>, const std::string &amp;typeString=&quot;&quot;)</td></tr>
<tr class="separator:ad4c84b9f7260314d84235cf311f5e39e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83349a48d7e179abaace8d16d020cef4" id="r_a83349a48d7e179abaace8d16d020cef4"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a83349a48d7e179abaace8d16d020cef4">newStreamResponse</a> (const std::function&lt; std::size_t(char *, std::size_t)&gt; &amp;callback, const std::string &amp;attachmentFileName=&quot;&quot;, <a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a> type=<a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823a61e343a42203e1c58b16c9683e1f0876">CT_NONE</a>, const std::string &amp;typeString=&quot;&quot;, const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;req=<a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a>())</td></tr>
<tr class="separator:a83349a48d7e179abaace8d16d020cef4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca2d38ae5fd48790b299933559f6e537" id="r_aca2d38ae5fd48790b299933559f6e537"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#aca2d38ae5fd48790b299933559f6e537">newAsyncStreamResponse</a> (const std::function&lt; void(<a class="el" href="namespacedrogon.html#ac29de97af31aae6951b30d7ef8749fd9">ResponseStreamPtr</a>)&gt; &amp;callback, bool disableKickoffTimeout=false)</td></tr>
<tr class="separator:aca2d38ae5fd48790b299933559f6e537"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40d143dcb8508d7618ee0f0d7c19ef23" id="r_a40d143dcb8508d7618ee0f0d7c19ef23"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a40d143dcb8508d7618ee0f0d7c19ef23"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpResponse.html#a40d143dcb8508d7618ee0f0d7c19ef23">newCustomHttpResponse</a> (T &amp;&amp;obj)</td></tr>
<tr class="memdesc:a40d143dcb8508d7618ee0f0d7c19ef23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a custom HTTP response object. For using this template, users must specialize the toResponse template.  <br /></td></tr>
<tr class="separator:a40d143dcb8508d7618ee0f0d7c19ef23"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">成员类型定义说明</h2>
<a id="a44ad31ad5d49291836b96434b5e7fc4a" name="a44ad31ad5d49291836b96434b5e7fc4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44ad31ad5d49291836b96434b5e7fc4a">&#9670;&#160;</a></span>SendfileRange</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classdrogon_1_1HttpResponse.html#a44ad31ad5d49291836b96434b5e7fc4a">drogon::HttpResponse::SendfileRange</a> =  std::pair&lt;size_t, size_t&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the range of the file response as a pair ot size_t (offset, length). Length of 0 means the entire file is sent. Behavior of this function is undefined if the response if not a file response </p>

</div>
</div>
<h2 class="groupheader">构造及析构函数说明</h2>
<a id="a4e18484f63f6da85c403a44605de5ee8" name="a4e18484f63f6da85c403a44605de5ee8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e18484f63f6da85c403a44605de5ee8">&#9670;&#160;</a></span>~HttpResponse()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual drogon::HttpResponse::~HttpResponse </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a7a97046bc1d9c458bc117860e6327eed" name="a7a97046bc1d9c458bc117860e6327eed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a97046bc1d9c458bc117860e6327eed">&#9670;&#160;</a></span>addCookie() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::addCookie </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdrogon_1_1Cookie.html">Cookie</a> &amp;&#160;</td>
          <td class="paramname"><em>cookie</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Add a cookie </p>

</div>
</div>
<a id="afb116c3db7cd2b29f8d6a574eb60a9b4" name="afb116c3db7cd2b29f8d6a574eb60a9b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb116c3db7cd2b29f8d6a574eb60a9b4">&#9670;&#160;</a></span>addCookie() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::addCookie </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Add a cookie </p>

</div>
</div>
<a id="ac65360ebe2d7e39013627fb7c1c97201" name="ac65360ebe2d7e39013627fb7c1c97201"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac65360ebe2d7e39013627fb7c1c97201">&#9670;&#160;</a></span>addCookie() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::addCookie </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdrogon_1_1Cookie.html">Cookie</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>cookie</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a53ecb77166d6b2d40bda2a33346b271c" name="a53ecb77166d6b2d40bda2a33346b271c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53ecb77166d6b2d40bda2a33346b271c">&#9670;&#160;</a></span>addHeader() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::addHeader </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>field</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the header string identified by the field parameter </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">field</td><td>The field parameter is transformed to lower case before storing. </td></tr>
    <tr><td class="paramname">value</td><td>The value of the header. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a0506888a960fa85365cc729c5ca35eb0" name="a0506888a960fa85365cc729c5ca35eb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0506888a960fa85365cc729c5ca35eb0">&#9670;&#160;</a></span>addHeader() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::addHeader </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>field</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="aca1cb08090fe9c6195d708a63e32f65f" name="aca1cb08090fe9c6195d708a63e32f65f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca1cb08090fe9c6195d708a63e32f65f">&#9670;&#160;</a></span>as()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T drogon::HttpResponse::as </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This template enables explicit type conversion, see the above template. </p>

</div>
</div>
<a id="ad5832929b4c9e740ac49e57af205b8d8" name="ad5832929b4c9e740ac49e57af205b8d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5832929b4c9e740ac49e57af205b8d8">&#9670;&#160;</a></span>asyncStreamCallback()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const std::function&lt; void(<a class="el" href="namespacedrogon.html#ac29de97af31aae6951b30d7ef8749fd9">ResponseStreamPtr</a>)&gt; &amp; drogon::HttpResponse::asyncStreamCallback </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>If the response is a async stream response (i.e. created by asyncStreamCallback) returns the stream ptr. </p>

</div>
</div>
<a id="a63c26ba958c691523e807de77e8e8ed1" name="a63c26ba958c691523e807de77e8e8ed1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a63c26ba958c691523e807de77e8e8ed1">&#9670;&#160;</a></span>body()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string_view drogon::HttpResponse::body </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the response body. </p>

</div>
</div>
<a id="a03bdeb98dfb26835960b744511408794" name="a03bdeb98dfb26835960b744511408794"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a03bdeb98dfb26835960b744511408794">&#9670;&#160;</a></span>clear()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reset the response object to its initial state </p>

</div>
</div>
<a id="a40d7c826a667934774e2b93c39e7a557" name="a40d7c826a667934774e2b93c39e7a557"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40d7c826a667934774e2b93c39e7a557">&#9670;&#160;</a></span>contentType()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a> drogon::HttpResponse::contentType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the response content type. </p>
<p>Set the response content type and the character set. virtual void setContentTypeCodeAndCharacterSet(ContentType type, const std::string &amp;charSet = "utf-8") = 0; </p>

</div>
</div>
<a id="aed36ab5336669f7db117913c8d028b2a" name="aed36ab5336669f7db117913c8d028b2a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed36ab5336669f7db117913c8d028b2a">&#9670;&#160;</a></span>contentTypeString()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string drogon::HttpResponse::contentTypeString </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the content type associated with the response </p>

</div>
</div>
<a id="a569c7cd5efff996af64e1103243b2249" name="a569c7cd5efff996af64e1103243b2249"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a569c7cd5efff996af64e1103243b2249">&#9670;&#160;</a></span>cookies()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const SafeStringMap&lt; <a class="el" href="classdrogon_1_1Cookie.html">Cookie</a> &gt; &amp; drogon::HttpResponse::cookies </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get all cookies. </p>

</div>
</div>
<a id="a07e21a5e58fbd8b859a9810bf338403d" name="a07e21a5e58fbd8b859a9810bf338403d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07e21a5e58fbd8b859a9810bf338403d">&#9670;&#160;</a></span>creationDate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const trantor::Date &amp; drogon::HttpResponse::creationDate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the creation timestamp of the response. </p>

</div>
</div>
<a id="a6bbaaa5b26a83176827ce4a9d2792da2" name="a6bbaaa5b26a83176827ce4a9d2792da2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6bbaaa5b26a83176827ce4a9d2792da2">&#9670;&#160;</a></span>expiredTime()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual ssize_t drogon::HttpResponse::expiredTime </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the expiration time of the response. </p>

</div>
</div>
<a id="a1cf39df6715c6d2340bb045cd94f76c3" name="a1cf39df6715c6d2340bb045cd94f76c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1cf39df6715c6d2340bb045cd94f76c3">&#9670;&#160;</a></span>getBody()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string_view drogon::HttpResponse::getBody </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the response body. </p>

</div>
</div>
<a id="a954b1cb990ba8834eeb6678e9ae740b0" name="a954b1cb990ba8834eeb6678e9ae740b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a954b1cb990ba8834eeb6678e9ae740b0">&#9670;&#160;</a></span>getContentType()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a> drogon::HttpResponse::getContentType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a57164725a0789fe9458de20ac6b6c402" name="a57164725a0789fe9458de20ac6b6c402"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57164725a0789fe9458de20ac6b6c402">&#9670;&#160;</a></span>getCookie()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classdrogon_1_1Cookie.html">Cookie</a> &amp; drogon::HttpResponse::getCookie </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get the cookie identified by the key parameter. If there is no the cookie, the empty cookie is returned. </p>

</div>
</div>
<a id="a6cecffb5a8b7095577a3bf5b2d6f0d6b" name="a6cecffb5a8b7095577a3bf5b2d6f0d6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6cecffb5a8b7095577a3bf5b2d6f0d6b">&#9670;&#160;</a></span>getCookies()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const SafeStringMap&lt; <a class="el" href="classdrogon_1_1Cookie.html">Cookie</a> &gt; &amp; drogon::HttpResponse::getCookies </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get all cookies. </p>

</div>
</div>
<a id="acb269abb75024232eb5ebb70df076dc5" name="acb269abb75024232eb5ebb70df076dc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb269abb75024232eb5ebb70df076dc5">&#9670;&#160;</a></span>getCreationDate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const trantor::Date &amp; drogon::HttpResponse::getCreationDate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a58081265552934448a6c40e521607985" name="a58081265552934448a6c40e521607985"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58081265552934448a6c40e521607985">&#9670;&#160;</a></span>getExpiredTime()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t drogon::HttpResponse::getExpiredTime </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a94dacca25b2485e1dd750235986f9fdd" name="a94dacca25b2485e1dd750235986f9fdd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a94dacca25b2485e1dd750235986f9fdd">&#9670;&#160;</a></span>getHeader()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const std::string &amp; drogon::HttpResponse::getHeader </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the header string identified by the key parameter. </p>
<dl class="section note"><dt>注解</dt><dd>If there is no the header, a empty string is returned. The key is case insensitive </dd></dl>

</div>
</div>
<a id="aee0e2cdc4ac1096ff9ad85d7ecaba38f" name="aee0e2cdc4ac1096ff9ad85d7ecaba38f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee0e2cdc4ac1096ff9ad85d7ecaba38f">&#9670;&#160;</a></span>getHeaders()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const SafeStringMap&lt; std::string &gt; &amp; drogon::HttpResponse::getHeaders </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get all headers of the response </p>

</div>
</div>
<a id="afdaff2509394ba08e58584aa7209e625" name="afdaff2509394ba08e58584aa7209e625"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdaff2509394ba08e58584aa7209e625">&#9670;&#160;</a></span>getJsonError()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const std::string &amp; drogon::HttpResponse::getJsonError </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the error message of parsing the JSON body received from peer. This method usually is called after getting a empty shared_ptr object by the <a class="el" href="classdrogon_1_1HttpResponse.html#a4a499e596719ced362e9eeae50de93c9">getJsonObject()</a> method. </p>
<dl class="section return"><dt>返回</dt><dd>const std::string&amp; The error message. An empty string is returned when no error occurs. </dd></dl>

</div>
</div>
<a id="a4a499e596719ced362e9eeae50de93c9" name="a4a499e596719ced362e9eeae50de93c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a499e596719ced362e9eeae50de93c9">&#9670;&#160;</a></span>getJsonObject()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const std::shared_ptr&lt; Json::Value &gt; &amp; drogon::HttpResponse::getJsonObject </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a1fbbcf3c1f7c799693bfeadf0d9f5adb" name="a1fbbcf3c1f7c799693bfeadf0d9f5adb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fbbcf3c1f7c799693bfeadf0d9f5adb">&#9670;&#160;</a></span>getPeerCertificate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const trantor::CertificatePtr &amp; drogon::HttpResponse::getPeerCertificate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a202565ddc4967af0a3d96f6d04781b97" name="a202565ddc4967af0a3d96f6d04781b97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a202565ddc4967af0a3d96f6d04781b97">&#9670;&#160;</a></span>getStatusCode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacedrogon.html#ad6cc6b2c3917537432fcde077e02cf2f">HttpStatusCode</a> drogon::HttpResponse::getStatusCode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a046e5e829a3cbd2ef7069370911cea1e" name="a046e5e829a3cbd2ef7069370911cea1e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a046e5e829a3cbd2ef7069370911cea1e">&#9670;&#160;</a></span>getVersion()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacedrogon.html#ac6b3a6bb435a379d956658fa20b067c1">Version</a> drogon::HttpResponse::getVersion </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the enum type version of the response. </p>

</div>
</div>
<a id="a278c40a9ac60b899e9b6217bf5a4b987" name="a278c40a9ac60b899e9b6217bf5a4b987"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a278c40a9ac60b899e9b6217bf5a4b987">&#9670;&#160;</a></span>getVersionString()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const char * drogon::HttpResponse::getVersionString </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a4b5d3ef182dbf502aa1ce5f754735a2c" name="a4b5d3ef182dbf502aa1ce5f754735a2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b5d3ef182dbf502aa1ce5f754735a2c">&#9670;&#160;</a></span>headers()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const SafeStringMap&lt; std::string &gt; &amp; drogon::HttpResponse::headers </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get all headers of the response </p>

</div>
</div>
<a id="a91282f3ceb97ea8c6625c9cd8ea98018" name="a91282f3ceb97ea8c6625c9cd8ea98018"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a91282f3ceb97ea8c6625c9cd8ea98018">&#9670;&#160;</a></span>ifCloseConnection()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool drogon::HttpResponse::ifCloseConnection </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the status set by the <a class="el" href="classdrogon_1_1HttpResponse.html#afde0d1d460db8890a988b546f8e37922" title="Set if close the connection after the request is sent.">setCloseConnection()</a> method. </p>

</div>
</div>
<a id="a57e800f8ad97516cb4738333b7afcba3" name="a57e800f8ad97516cb4738333b7afcba3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57e800f8ad97516cb4738333b7afcba3">&#9670;&#160;</a></span>jsonObject()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const std::shared_ptr&lt; Json::Value &gt; &amp; drogon::HttpResponse::jsonObject </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get the json object from the server response. If the response is not in json format, then a empty shared_ptr is returned. </p>

</div>
</div>
<a id="aca2d38ae5fd48790b299933559f6e537" name="aca2d38ae5fd48790b299933559f6e537"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca2d38ae5fd48790b299933559f6e537">&#9670;&#160;</a></span>newAsyncStreamResponse()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> drogon::HttpResponse::newAsyncStreamResponse </td>
          <td>(</td>
          <td class="paramtype">const std::function&lt; void(<a class="el" href="namespacedrogon.html#ac29de97af31aae6951b30d7ef8749fd9">ResponseStreamPtr</a>)&gt; &amp;&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>disableKickoffTimeout</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Create a response that allows sending asynchronous data from a callback function </p><dl class="section note"><dt>注解</dt><dd>Async streams are always sent with Transfer-Encoding: chunked. </dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">callback</td><td>function that receives the asynchronous HTTP stream. You may call the stream-&gt;send() method to transmit new data. The send method will return true as long as the stream is still open. Once you have finished sending data, or the stream-&gt;send() function returned false, you should call stream-&gt;close() to gracefully close the chunked transfer. </td></tr>
    <tr><td class="paramname">disableKickoffTimeout</td><td>set this to true to disable trantors default kickoff timeout. This is useful if you need long running asynchronous streams. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a40d143dcb8508d7618ee0f0d7c19ef23" name="a40d143dcb8508d7618ee0f0d7c19ef23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40d143dcb8508d7618ee0f0d7c19ef23">&#9670;&#160;</a></span>newCustomHttpResponse()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> drogon::HttpResponse::newCustomHttpResponse </td>
          <td>(</td>
          <td class="paramtype">T &amp;&amp;&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a custom HTTP response object. For using this template, users must specialize the toResponse template. </p>

</div>
</div>
<a id="a8800fe9bd787342db3b231d6996a8cfe" name="a8800fe9bd787342db3b231d6996a8cfe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8800fe9bd787342db3b231d6996a8cfe">&#9670;&#160;</a></span>newFileResponse() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> drogon::HttpResponse::newFileResponse </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>fullPath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>attachmentFileName</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a>&#160;</td>
          <td class="paramname"><em>type</em> = <code><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823a61e343a42203e1c58b16c9683e1f0876">CT_NONE</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>typeString</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>req</em> = <code><a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a response that returns a file to the client. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fullPath</td><td>is the full path to the file. </td></tr>
    <tr><td class="paramname">attachmentFileName</td><td>if the parameter is not empty, the browser does not open the file, but saves it as an attachment. </td></tr>
    <tr><td class="paramname">type</td><td>the content type code. If the parameter is CT_NONE, the content type is set by drogon based on the file extension and typeString. Set it to CT_CUSTOM when no drogon internal content type matches. </td></tr>
    <tr><td class="paramname">typeString</td><td>the MIME string of the content type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a83447cc5e0ef7135146f1ce5059d39b8" name="a83447cc5e0ef7135146f1ce5059d39b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83447cc5e0ef7135146f1ce5059d39b8">&#9670;&#160;</a></span>newFileResponse() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> drogon::HttpResponse::newFileResponse </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>fullPath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>setContentRange</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>attachmentFileName</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a>&#160;</td>
          <td class="paramname"><em>type</em> = <code><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823a61e343a42203e1c58b16c9683e1f0876">CT_NONE</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>typeString</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>req</em> = <code><a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a response that returns part of a file to the client. </p>
<p>If offset and length can not be satisfied, statusCode will be set to k416RequestedRangeNotSatisfiable, and nothing else will be modified.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fullPath</td><td>is the full path to the file. </td></tr>
    <tr><td class="paramname">offset</td><td>is the offset to begin sending, in bytes. </td></tr>
    <tr><td class="paramname">length</td><td>is the total length to send, in bytes. In particular, length = 0 means send all content from offset till end of file. </td></tr>
    <tr><td class="paramname">setContentRange</td><td>whether set 'Content-Range' header automatically. </td></tr>
    <tr><td class="paramname">attachmentFileName</td><td>if the parameter is not empty, the browser does not open the file, but saves it as an attachment. </td></tr>
    <tr><td class="paramname">type</td><td>the content type code. If the parameter is CT_NONE, the content type is set by drogon based on the file extension and typeString. Set it to CT_CUSTOM when no drogon internal content type matches. </td></tr>
    <tr><td class="paramname">typeString</td><td>the MIME string of the content type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad4c84b9f7260314d84235cf311f5e39e" name="ad4c84b9f7260314d84235cf311f5e39e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4c84b9f7260314d84235cf311f5e39e">&#9670;&#160;</a></span>newFileResponse() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> drogon::HttpResponse::newFileResponse </td>
          <td>(</td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>pBuffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bufferLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>attachmentFileName</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a>&#160;</td>
          <td class="paramname"><em>type</em> = <code><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823a61e343a42203e1c58b16c9683e1f0876">CT_NONE</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>typeString</em> = <code>&quot;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Create a response that returns a file to the client from buffer in memory/stack </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">pBuffer</td><td>is a uint 8 bit flat buffer for object/files in memory </td></tr>
    <tr><td class="paramname">bufferLength</td><td>is the length of the expected buffer </td></tr>
    <tr><td class="paramname">attachmentFileName</td><td>if the parameter is not empty, the browser does not open the file, but saves it as an attachment. </td></tr>
    <tr><td class="paramname">type</td><td>the content type code. If the parameter is CT_NONE, the content type is set by drogon based on the file extension and typeString. Set it to CT_CUSTOM when no drogon internal content type matches. </td></tr>
    <tr><td class="paramname">typeString</td><td>the MIME string of the content type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a82c46a1155b1ff1494f5995b241b4034" name="a82c46a1155b1ff1494f5995b241b4034"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a82c46a1155b1ff1494f5995b241b4034">&#9670;&#160;</a></span>newHttpJsonResponse() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> drogon::HttpResponse::newHttpJsonResponse </td>
          <td>(</td>
          <td class="paramtype">const Json::Value &amp;&#160;</td>
          <td class="paramname"><em>data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Create a response which returns a json object. Its content-type is set to application/json. </p>

</div>
</div>
<a id="ab2bd4aa9c3b2caa800534f3013b491e8" name="ab2bd4aa9c3b2caa800534f3013b491e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2bd4aa9c3b2caa800534f3013b491e8">&#9670;&#160;</a></span>newHttpJsonResponse() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> drogon::HttpResponse::newHttpJsonResponse </td>
          <td>(</td>
          <td class="paramtype">Json::Value &amp;&amp;&#160;</td>
          <td class="paramname"><em>data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Create a response which returns a json object. Its content-type is set to application/json. </p>

</div>
</div>
<a id="a76e9f38d3cf0b6b69d23d1f53ce5afbe" name="a76e9f38d3cf0b6b69d23d1f53ce5afbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76e9f38d3cf0b6b69d23d1f53ce5afbe">&#9670;&#160;</a></span>newHttpResponse() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> drogon::HttpResponse::newHttpResponse </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Create a normal response with a status code of 200ok and a content type of text/html. </p>

</div>
</div>
<a id="aa409a489a6bb1b7b9a4fd01aee2ed3d7" name="aa409a489a6bb1b7b9a4fd01aee2ed3d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa409a489a6bb1b7b9a4fd01aee2ed3d7">&#9670;&#160;</a></span>newHttpResponse() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> drogon::HttpResponse::newHttpResponse </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacedrogon.html#ad6cc6b2c3917537432fcde077e02cf2f">HttpStatusCode</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a>&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a response with a status code and a content type </p>

</div>
</div>
<a id="a7001b5fa3cf32b1401c01e65fcafa4d7" name="a7001b5fa3cf32b1401c01e65fcafa4d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7001b5fa3cf32b1401c01e65fcafa4d7">&#9670;&#160;</a></span>newHttpViewResponse()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> drogon::HttpResponse::newHttpViewResponse </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>viewName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdrogon_1_1HttpViewData.html">HttpViewData</a> &amp;&#160;</td>
          <td class="paramname"><em>data</em> = <code><a class="el" href="classdrogon_1_1HttpViewData.html">HttpViewData</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>req</em> = <code><a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Create a response that returns a page rendered by a view named viewName. </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">viewName</td><td>The name of the view </td></tr>
    <tr><td class="paramname">data</td><td>is the data displayed on the page. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>注解</dt><dd>For more details, see the wiki pages, the "View" section. </dd></dl>

</div>
</div>
<a id="ae7dbe82af88eae091b7684edb67d5f99" name="ae7dbe82af88eae091b7684edb67d5f99"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7dbe82af88eae091b7684edb67d5f99">&#9670;&#160;</a></span>newNotFoundResponse()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> drogon::HttpResponse::newNotFoundResponse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>req</em> = <code><a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a>()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a response which returns a 404 page. </p>

</div>
</div>
<a id="a953a8ca52e9f14b44f076f576c86dbd6" name="a953a8ca52e9f14b44f076f576c86dbd6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a953a8ca52e9f14b44f076f576c86dbd6">&#9670;&#160;</a></span>newRedirectionResponse()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> drogon::HttpResponse::newRedirectionResponse </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>location</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacedrogon.html#ad6cc6b2c3917537432fcde077e02cf2f">HttpStatusCode</a>&#160;</td>
          <td class="paramname"><em>status</em> = <code><a class="el" href="namespacedrogon.html#ad6cc6b2c3917537432fcde077e02cf2fa9eabc5c863c94feee133e077aec244c2">k302Found</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Create a response that returns a redirection page, redirecting to another page located in the location parameter. </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">location</td><td>The location to redirect </td></tr>
    <tr><td class="paramname">status</td><td>The HTTP status code, k302Found by default. Users could set it to one of the 301, 302, 303, 307, ... </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a83349a48d7e179abaace8d16d020cef4" name="a83349a48d7e179abaace8d16d020cef4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83349a48d7e179abaace8d16d020cef4">&#9670;&#160;</a></span>newStreamResponse()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> drogon::HttpResponse::newStreamResponse </td>
          <td>(</td>
          <td class="paramtype">const std::function&lt; std::size_t(char *, std::size_t)&gt; &amp;&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>attachmentFileName</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a>&#160;</td>
          <td class="paramname"><em>type</em> = <code><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823a61e343a42203e1c58b16c9683e1f0876">CT_NONE</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>typeString</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>req</em> = <code><a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Create a response that returns a file to the client from a callback function </p><dl class="section note"><dt>注解</dt><dd>if the Connection is keep-alive and the Content-Length header is not set, the stream data is sent with Transfer-Encoding: chunked. </dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">callback</td><td>function to retrieve the stream data (stream ends when a zero size is returned) the callback will be called with nullptr when the send is finished/interrupted so that it cleans up its internals. </td></tr>
    <tr><td class="paramname">attachmentFileName</td><td>if the parameter is not empty, the browser does not open the file, but saves it as an attachment. </td></tr>
    <tr><td class="paramname">type</td><td>the content type code. If the parameter is CT_NONE, the content type is set by drogon based on the file extension and typeString. Set it to CT_CUSTOM when no drogon internal content type matches. </td></tr>
    <tr><td class="paramname">typeString</td><td>the MIME string of the content type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae17cf4dedf9b48c946206745b5309726" name="ae17cf4dedf9b48c946206745b5309726"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae17cf4dedf9b48c946206745b5309726">&#9670;&#160;</a></span>operator T()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">drogon::HttpResponse::operator T </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This template enables automatic type conversion. For using this template, user must specialize the fromResponse template. For example a shared_ptr&lt;Json::Value&gt; specialization version is available above, so we can use the following code to get a json object: </p>
<div class="fragment"><div class="line">std::shared_ptr&lt;Json::Value&gt; jsonPtr = *responsePtr;</div>
</div><!-- fragment --><p> With this template, user can use their favorite JSON library instead of the default jsoncpp library or convert the response to an object of any custom type. </p>

</div>
</div>
<a id="ae00c3140bb4759feaea8fc7f7e82e940" name="ae00c3140bb4759feaea8fc7f7e82e940"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae00c3140bb4759feaea8fc7f7e82e940">&#9670;&#160;</a></span>peerCertificate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const trantor::CertificatePtr &amp; drogon::HttpResponse::peerCertificate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the certificate of the peer, if any. </p>
<dl class="section return"><dt>返回</dt><dd>The certificate of the peer. nullptr is none. </dd></dl>

</div>
</div>
<a id="a78ef3f2563aeba016ae88cc7a0a6a123" name="a78ef3f2563aeba016ae88cc7a0a6a123"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78ef3f2563aeba016ae88cc7a0a6a123">&#9670;&#160;</a></span>removeCookie()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::removeCookie </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Remove the cookie identified by the key parameter. </p>

</div>
</div>
<a id="a76f37d51bf036afb28aacaa229a1823b" name="a76f37d51bf036afb28aacaa229a1823b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76f37d51bf036afb28aacaa229a1823b">&#9670;&#160;</a></span>removeHeader()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::removeHeader </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Remove the header identified by the key parameter. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">key</td><td>The key is case insensitive </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8d1bc11f80d93ad6a8ee7fb64e51dde0" name="a8d1bc11f80d93ad6a8ee7fb64e51dde0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d1bc11f80d93ad6a8ee7fb64e51dde0">&#9670;&#160;</a></span>sendfileName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const std::string &amp; drogon::HttpResponse::sendfileName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>If the response is a file response (i.e. created by newFileResponse) returns the path on the filesystem. Otherwise a empty string. </p>

</div>
</div>
<a id="a259114437157085d2f3dda48a181e264" name="a259114437157085d2f3dda48a181e264"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a259114437157085d2f3dda48a181e264">&#9670;&#160;</a></span>sendfileRange()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classdrogon_1_1HttpResponse.html#a44ad31ad5d49291836b96434b5e7fc4a">SendfileRange</a> &amp; drogon::HttpResponse::sendfileRange </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="adc5e9e155d366c487c1601feca9b8203" name="adc5e9e155d366c487c1601feca9b8203"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc5e9e155d366c487c1601feca9b8203">&#9670;&#160;</a></span>setBody() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int N&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void drogon::HttpResponse::setBody </td>
          <td>(</td>
          <td class="paramtype">const char(&amp;)&#160;</td>
          <td class="paramname"><em>body</em>[N]</td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the response body(content). </p>

</div>
</div>
<a id="a18114e50a4274cebdab859bf8d9deb1e" name="a18114e50a4274cebdab859bf8d9deb1e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a18114e50a4274cebdab859bf8d9deb1e">&#9670;&#160;</a></span>setBody() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::setBody </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>body</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the response body(content). </p>
<dl class="section note"><dt>注解</dt><dd>The body must match the content type </dd></dl>

</div>
</div>
<a id="a015c77c0a7a47f0e37347038ce4de81a" name="a015c77c0a7a47f0e37347038ce4de81a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a015c77c0a7a47f0e37347038ce4de81a">&#9670;&#160;</a></span>setBody() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::setBody </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&amp;&#160;</td>
          <td class="paramname"><em>body</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the response body(content). </p>

</div>
</div>
<a id="afde0d1d460db8890a988b546f8e37922" name="afde0d1d460db8890a988b546f8e37922"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afde0d1d460db8890a988b546f8e37922">&#9670;&#160;</a></span>setCloseConnection()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::setCloseConnection </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>on</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set if close the connection after the request is sent. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">on</td><td>if the parameter is false, the connection keeps alive on the condition that the client request has a 'keep-alive' head, otherwise it is closed immediately after sending the last byte of the response. It's false by default when the response is created. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a66d24be506a03dd6bd0b390632ba8d5c" name="a66d24be506a03dd6bd0b390632ba8d5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a66d24be506a03dd6bd0b390632ba8d5c">&#9670;&#160;</a></span>setContentTypeCode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::setContentTypeCode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a>&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set the response content type, such as text/html, text/plain, image/png and so on. If the content type is a text type, the character set is utf8. </p>

</div>
</div>
<a id="aa1f02075d07dd25e1d9650773858def2" name="aa1f02075d07dd25e1d9650773858def2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa1f02075d07dd25e1d9650773858def2">&#9670;&#160;</a></span>setContentTypeCodeAndCustomString() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int N&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void drogon::HttpResponse::setContentTypeCodeAndCustomString </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char(&amp;)&#160;</td>
          <td class="paramname"><em>typeString</em>[N]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="af254863ebc2d6f3ff9679515be4a4d61" name="af254863ebc2d6f3ff9679515be4a4d61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af254863ebc2d6f3ff9679515be4a4d61">&#9670;&#160;</a></span>setContentTypeCodeAndCustomString() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void drogon::HttpResponse::setContentTypeCodeAndCustomString </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacedrogon.html#a2037a41934aeea1598d7468b4b8cb823">ContentType</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string_view &amp;&#160;</td>
          <td class="paramname"><em>typeString</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set the response content type and the content-type string, The string may contain the header name and CRLF. Or just the MIME type For example, "content-type: text/plain\r\n" or "text/plain" </p>

</div>
</div>
<a id="ac9ee5b698aa6bfa317ef81cd69a6d821" name="ac9ee5b698aa6bfa317ef81cd69a6d821"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9ee5b698aa6bfa317ef81cd69a6d821">&#9670;&#160;</a></span>setContentTypeString()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void drogon::HttpResponse::setContentTypeString </td>
          <td>(</td>
          <td class="paramtype">const std::string_view &amp;&#160;</td>
          <td class="paramname"><em>typeString</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set the content-type string, The string may contain the header name and CRLF. Or just the MIME type For example, "content-type: text/plain\r\n" or "text/plain" </p>

</div>
</div>
<a id="abf88889bd7729e6f80ee8d5322c9e931" name="abf88889bd7729e6f80ee8d5322c9e931"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf88889bd7729e6f80ee8d5322c9e931">&#9670;&#160;</a></span>setCustomStatusCode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void drogon::HttpResponse::setCustomStatusCode </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string_view&#160;</td>
          <td class="paramname"><em>message</em> = <code>std::string_view{}</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a975259181a13f0ab238ef5325caf8b8b" name="a975259181a13f0ab238ef5325caf8b8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a975259181a13f0ab238ef5325caf8b8b">&#9670;&#160;</a></span>setExpiredTime()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::setExpiredTime </td>
          <td>(</td>
          <td class="paramtype">ssize_t&#160;</td>
          <td class="paramname"><em>expiredTime</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set the expiration time of the response cache in memory. in seconds, 0 means always cache, negative means not cache, default is -1. </p>

</div>
</div>
<a id="aec5f18f112c1a8ffd253cf31c2c84fd4" name="aec5f18f112c1a8ffd253cf31c2c84fd4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec5f18f112c1a8ffd253cf31c2c84fd4">&#9670;&#160;</a></span>setPassThrough()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::setPassThrough </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>flag</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the response object to the pass-through mode or not. It's not by default when a new response object is created. In pass-through mode, no additional headers (including server, date, content-type and content-length, etc.) are added to the response. This mode is useful for some applications such as a proxy. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">flag</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ac1523682a313c946849b7234cc4891ab" name="ac1523682a313c946849b7234cc4891ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1523682a313c946849b7234cc4891ab">&#9670;&#160;</a></span>setStatusCode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::setStatusCode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacedrogon.html#ad6cc6b2c3917537432fcde077e02cf2f">HttpStatusCode</a>&#160;</td>
          <td class="paramname"><em>code</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the status code of the response. </p>

</div>
</div>
<a id="aad3deeeee0abe826a7800402a24475b8" name="aad3deeeee0abe826a7800402a24475b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad3deeeee0abe826a7800402a24475b8">&#9670;&#160;</a></span>setVersion()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpResponse::setVersion </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacedrogon.html#ac6b3a6bb435a379d956658fa20b067c1">Version</a>&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the http version, http1.0 or http1.1 </p>

</div>
</div>
<a id="a7091b020a4c8212b170c0ae71a77adea" name="a7091b020a4c8212b170c0ae71a77adea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7091b020a4c8212b170c0ae71a77adea">&#9670;&#160;</a></span>statusCode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="namespacedrogon.html#ad6cc6b2c3917537432fcde077e02cf2f">HttpStatusCode</a> drogon::HttpResponse::statusCode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the status code such as 200, 404 </p>

</div>
</div>
<a id="af345a0cc25536620c01dafcc04667bfa" name="af345a0cc25536620c01dafcc04667bfa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af345a0cc25536620c01dafcc04667bfa">&#9670;&#160;</a></span>streamCallback()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const std::function&lt; std::size_t(char *, std::size_t)&gt; &amp; drogon::HttpResponse::streamCallback </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>If the response is a stream response (i.e. created by newStreamResponse) returns the callback function. Otherwise a null function. </p>

</div>
</div>
<a id="a99c9e306078005a68455e3157884f483" name="a99c9e306078005a68455e3157884f483"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99c9e306078005a68455e3157884f483">&#9670;&#160;</a></span>version()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="namespacedrogon.html#ac6b3a6bb435a379d956658fa20b067c1">Version</a> drogon::HttpResponse::version </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the enum type version of the response. </p>
<p>kHttp10 means Http version is 1.0 kHttp11 means Http version is 1.1 </p>

</div>
</div>
<a id="a77a3c7a91c08d0976851beb1552fde81" name="a77a3c7a91c08d0976851beb1552fde81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77a3c7a91c08d0976851beb1552fde81">&#9670;&#160;</a></span>versionString()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char * drogon::HttpResponse::versionString </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Return the string of http version of request, such as HTTP/1.0, HTTP/1.1, etc. </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li><a class="el" href="HttpResponse_8h_source.html">HttpResponse.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>
